package ${packageName};

import com.jshan.base.vo.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;

@Tag(name = "${tableComment}")
@RestController
@RequestMapping("/${tableName}")
public class ${className}Controller {
    @Resource
    private ${className}Service ${className?uncap_first}Service;

    @Operation(summary = "分页查询")
    @GetMapping("/list")
    public Result<?> list() {
        // TODO: 分页查询
        return Result.ok();
    }

    @Operation(summary = "新增")
    @PostMapping("/add")
    public Result<?> add(@RequestBody ${className} entity) {
        // TODO: 新增
        return Result.ok();
    }

    @Operation(summary = "编辑")
    @PostMapping("/edit")
    public Result<?> edit(@RequestBody ${className} entity) {
        // TODO: 编辑
        return Result.ok();
    }

    @Operation(summary = "删除")
    @PostMapping("/delete")
    public Result<?> delete(@RequestParam Long id) {
        // TODO: 删除
        return Result.ok();
    }
} 